CREATE TABLE dog(
id int auto_increment PRIMARY KEY COMMENT'序号',
name VARCHAR(12) COMMENT'昵称',
health int COMMENT'健康值',
love int COMMENT'亲密度',
strain VARCHAR(20) comment'品种' 
)comment'狗狗表格';


CREATE TABLE master(
id int auto_increment PRIMARY KEY COMMENT'序号',
name VARCHAR(12) COMMENT'姓名',
`password` VARCHAR(20) comment'密码',
money int COMMENT'元宝数'

)COMMENT'主人表格';

begin;
insert into dog values(1,'可可',100,70,'牧羊犬');
ROLLBACK;
UPDATE dog SET health=77 WHERE id=1; 
select * from dog;


--创建管理账号
 CREATE USER 'sxx'@'localhost' IDENTIFIED BY '123456';
-- 给sxx账户授权
GRANT all on myschool.* TO 'sxx'@'localhost';
--授权可以访问epet数据库 *要加
GRANT all on epet.* TO 'sxx'@'localhost';
--查看全部管理用户 用户信息都在mysql.user
SELECT * from mysql.user;  
--删除权限
 REVOKE all on myschool from 'sxx'@'localhost';
 REVOKE all on epet from 'sxx'@'localhost';